from public.action import *
from public.business import *
from public.testData import *
from public.tools import *
from selenium.webdriver.support.select import Select
testCase = "DBshop009_销售管理退货线索"
firefox = openBrowser(urlAdmin)
DBshopLoginAdmin(firefox)
DBshopEnterMenu2(firefox,'销售管理','退货管理')

s=Select(firefox.find_element_by_xpath('//select[@name="refund_type"]'))
s.select_by_visible_text('退款到账户余额')
firefox.find_element_by_xpath('//button[1]').click()

try:
    firefox.find_element_by_xpath('/html/body/div[2]/div/div[2]/table/tbody/tr[2]/td[1]')
    writeLog('%s 测试成功'%testCase)
except:
    writeLog('%s 测试失败'%testCase)

firefox.quit()